package topcoder;

import java.util.*;

public class EllysRoomAssignmentsDiv2 {

	public double getProbability(String[] ratings) {
		ArrayList<Integer> T = new ArrayList<Integer>();

		StringBuilder S = new StringBuilder();
		
		for(String s : ratings) {
			S.append(s);
		}
		
		StringTokenizer st = new StringTokenizer(S.toString(), " ");
		while (st.hasMoreTokens()) {
			String t = st.nextToken();
			int d = Integer.parseInt(t);
			T.add(d);
		}
		
		int n = T.size();
		int e = T.get(0);
		
		Collections.sort(T, Collections.reverseOrder());
		
		int ei = 0;
		for (int i = 0; i < n; i++) {
			if (T.get(i) == e) {
				ei = i; 
				break;
			}
		}
		
		int r = (int)Math.ceil((double)n / 20);
		
		int er = ei / r;
		
		if (er == 0) {
			if (ei == 0 || r == 1)
				return 1.0;
			else
				return 0.0;
		} else {
			return 1.0 / r;
		}
	}
	
	public static void main(String[] args) {
		String[] S = new String[]
				{"539 457 277 929 180 296 820 319 839 199 210 989 88", "5 1033 1132 479 1023 425 340 828 843 934 1124 434 ", "264 206 1117 569 388 351 972 348 176 1182 832"};
		
		EllysRoomAssignmentsDiv2 r = new EllysRoomAssignmentsDiv2();
		System.out.println(r.getProbability(S));
	}
	
}
